package com.xiaoyi;

import android.app.Application;

import com.xiaoyi.entity.XyData;

import java.util.ArrayList;
import java.util.List;

import me.yokeyword.fragmentation.Fragmentation;
import me.yokeyword.fragmentation.helper.ExceptionHandler;


public class App extends Application {

    public static  List<XyData> musicList =  new ArrayList();
    public static  int playingIndex = 0 ;


    @Override
    public void onCreate() {
        super.onCreate();

        Fragmentation.builder()
                .stackViewMode(Fragmentation.BUBBLE)
                .debug(false)
                /// 可以获取到 {@link me.yokeyword.fragmentation.exception.AfterSaveStateTransactionWarning}
                /// 在遇到After onSaveInstanceState时，不会抛出异常，会回调到下面的ExceptionHandler
                .handleException(new ExceptionHandler() {
                    @Override
                    public void onException(Exception e) {
                        // todo ...
                    }
                })
                .install();
    }
}
